Imports System.Drawing
Imports System.Drawing.Drawing2D

Public Class TwoPointLinearGradientBrush
    Private Sub TwoPointLinearGradientBrush_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim cx As Integer = Me.Width
        Dim cy As Integer = Me.Height
        Dim lgbrush As New LinearGradientBrush(New Point(cx \ 4, cy \ 4), New Point(3 * cx \ 4, 3 * cy \ 4), Color.White, Color.Black)
        lgbrush.WrapMode = WrapMode.TileFlipX
        e.Graphics.FillRectangle(lgbrush, 0, 0, cx, cy)
    End Sub

    Private Sub TwoPointLinearGradientBrush_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class
